// CRC32: 448113A6 | Unity headers extracted from Marmoset Diffuse IBL.shader
// Shader "Marmoset/Mobile/Diffuse IBL" {
//   Properties {
//    _Color ("Diffuse Color", Color) = (1,1,1,1)
//    _MainTex ("Diffuse(RGB) Alpha(A)", 2D) = "white" { }
//    _DiffCubeIBL ("Custom Diffuse Cube", CUBE) = "black" { }
//    _SpecCubeIBL ("Custom Specular Cube", CUBE) = "black" { }
//   }
//   Fallback "Diffuse"
//   SubShader 1/1 {
//     LOD 200
//     Tags { "QUEUE"="Geometry" "RenderType"="Opaque" }
//     Pass 1/2 {
//       Name "FORWARD"
//       Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//       GpuProgramID 51476
//       Program "vp" {
//         SubProgram "d3d9 " {
//           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_ON" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "VERTEXLIGHT_ON" }
//           Bind "vertex" Vertex
//           Bind "normal" Normal
//           Bind "texcoord" TexCoord0
//           Bind "texcoord2" TexCoord2
//           Matrix 8 [_Object2World] 3
//           Matrix 11 [_World2Object] 3
//           Matrix 4 [glstate_matrix_mvp]
//           Vector 21 [_MainTex_ST]
//           Vector 14 [_ProjectionParams]
//           Vector 15 [_ScreenParams]
//           Vector 19 [unity_4LightAtten0]
//           Vector 16 [unity_4LightPosX0]
//           Vector 17 [unity_4LightPosY0]
//           Vector 18 [unity_4LightPosZ0]
//           Vector 20 [unity_DynamicLightmapST]
//           Vector 0 [unity_LightColor0]
//           Vector 1 [unity_LightColor1]
//           Vector 2 [unity_LightColor2]
//           Vector 3 [unity_LightColor3]
//         }
//       }
//     }
//   }
// }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0
    def c22, 0, 1, 0.5, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord2 v3
    dcl_position o0
    dcl_texcoord o1.xy
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3.xyz
    dcl_texcoord3 o4.xyz
    dcl_texcoord4 o5
    dcl_texcoord6 o6

def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

    mad o1.xy, v2, c21, c21.zwzw
    mad o6.zw, v3.xyxy, c20.xyxy, c20
    mul r0.xyz, c12, v1.y
    mad r0.xyz, c11, v1.x, r0
    mad r0.xyz, c13, v1.z, r0
    nrm r1.xyz, r0
    dp4 r0.y, c9, v0
    add r2, -r0.y, c17
    mul r3, r1.y, r2
    mul r2, r2, r2
    dp4 r0.x, c8, v0
    add r4, -r0.x, c16
    mad r3, r4, r1.x, r3
    mad r2, r4, r4, r2
    dp4 r0.z, c10, v0
    add r4, -r0.z, c18
    mov o3.xyz, r0
    mad r0, r4, r1.z, r3
    mov o2.xyz, r1
    mad r1, r4, r4, r2
    rsq r2.x, r1.x
    rsq r2.y, r1.y
    rsq r2.z, r1.z
    rsq r2.w, r1.w
    mov r3.y, c22.y
    mad r1, r1, c19, r3.y
    mul r0, r0, r2
    max r0, r0, c22.x
    rcp r2.x, r1.x
    rcp r2.y, r1.y
    rcp r2.z, r1.z
    rcp r2.w, r1.w
    mul r0, r0, r2
    mul r1.xyz, r0.y, c1
    mad r1.xyz, c0, r0.x, r1
    mad r0.xyz, c2, r0.z, r1
    mad o4.xyz, c3, r0.w, r0
    dp4 r0.y, c5, v0
    mul r1.x, r0.y, c14.x
    mul r1.w, r1.x, c22.z
    dp4 r0.x, c4, v0
    dp4 r0.w, c7, v0

mov o0, r0 // Relocated from line 106 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Marmoset_Mobile_Diffuse IBL/vp/448113A6.txt
texldl r31, c220.z, s0
add r31.w, r0.w, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    mul r1.xz, r0.xyww, c22.z
    mad o5.xy, r1.z, c15.zwzw, r1.xwzw
    dp4 r0.z, c6, v0

//     mov o0, r0 // Relocated to line 103 with shadertool.py
mov o0.z, r0 // Inserted by shadertool.py

    mov o5.zw, r0
    mov o6.xy, c22.x
